import request from '@/utils/request'

// 创建协议管理
export function createAgreement(data) {
    return request({
        url: '/pekingFish/agreement',
        method: 'post',
        data: data
    })
}

// 更新协议管理
export function updateAgreement(data) {
    return request({
        url: '/pekingFish/agreement',
        method: 'put',
        data: data
    })
}

// 删除协议管理
export function deleteAgreement(id) {
    return request({
        url: '/pekingFish/agreement/delete?id=' + id,
        method: 'delete'
    })
}

// 获得协议管理
export function getAgreement(id) {
    return request({
        url: '/pekingFish/agreement/get?id=' + id,
        method: 'get'
    })
}

// 获得协议管理分页
export function getAgreementPage(query) {
    return request({
        url: '/pekingFish/agreement/pageAgreements',
        method: 'get',
        params: query
    })
}

// 导出协议管理 Excel
export function exportAgreementExcel(query) {
    return request({
        url: '/pekingFish/agreement/export-excel',
        method: 'get',
        params: query,
        responseType: 'blob'
    })
}
